The present invention relates to an apparatus for controlling an elevator and, more particularly, to an apparatus having a microcomputer for controlling an elevator.
FIG. 1 is a diagram showing the schematic construction of an apparatus including a microcomputer for controlling the operation of an elevator as it is moved between a plurality of floors. In FIG. 1, reference numeral 1 denotes a cage of an elevator, numeral 2 a balance weight, and numeral 3 a cable engaged on a sheave 4. The cage 1 and the weight 2 are connected to both ends of the cable 3. Reference numeral 5 denotes an electric motor for driving the sheave 4, numeral 6 a pulse generator for generating a pulse proportional to the moving distance of the cage 1 by the rotation of the motor 5, and numeral 7 a counter circuit for counting the number of pulses generated from the pulse generator 6. A microcomputer 8 which includes, as shown in FIG. 3, a CPU 8a, a ROM 8b, a RAM 8c, an input port 8d, and an output port 8e, receives a signal from the counter circuit 7 at the input port 8d and generates an output signal at the output port 8e. Reference numeral 9 denotes a floor, numeral 10 plates provided in a hoistway corresponding to the floors, and numerals 11 and 12 position detectors provided in the cage 1 for producing output signals 11a and 12a when the cage 1 reaches a position about 10 mm lower and about 10 mm higher than the level of each floor, respectively. These output signals 11a and 12a are then sent to the counter circuit 7 and the microcomputer 8.
FIG. 2 shows a diagram iof the detailed arrangement of the counter circuit 7 illustrated in FIG. 1. As shown, the counter circuit 7 includes a pair of 4-bit binary counters CT1 and CT2. An output pulse 6a from the pulse generator 6 is applied directly to a terminal T of the counter CT1 and to a terminal T of the counter CT2 through a NAND gate NAND1 and a NOT gate NOT1 to count running pulses of the cage 1 during the calculating period of the microcomputer 8 and to store the counted pulses to be delivered to the CPU 8a through the input port 8d in the next inputting process. The counter circuit 7 further includes a pair of R-S flip-flops (hereinafter referred to as "flip-flops") FF1 and FF2 having the set terminals S connected to the outputs of NAND gates NAND2 and NAND3, respectively. An up signal UP generated from the microcomputer 8, an output signal 11a from the position detector 11, and a signal produced by passing the output signal 11a through a NOT gate NOT2 and a time constant circuit of a resistor R1 and a capacitor C1 are all applied to the input of the NAND gate NAND 2. A down signal DN generated from the microcomputer 8, an output signal 12a from the position detector 12, and a signal produced by passing the output signal 12a through a NOT gate NOT3 and a time constant circuit of a resistor R2 and a capacitor C2 are applied to the input of the NAND gate NAND3. Further, the outputs Q of the flip-flops FF1 and FF2 are connected to the inputs of an OR gate OR1, and the output signal of the OR gate OR1 is applied to the other input of the NAND gate NAND1. Thus, the counter CT2 stops the counting operation at every rising time of the output signal of the position detector 11 or 12. A reset signal RESET generated from the microcomputer 8 is applied to the counters CT1 and CT2 and the reset terminals R of the flip-flops FF1 and FF2.
FIG. 4 shows the storage memory address of the RAM 8c of the microcomputer 8 which stores the level position data representing the levels of N respective floors in a building wherein FLH(0) denotes the level of the lowermost floor, and FLH(N-1) denotes the level of the uppermost floor.
The operation of the above-described apparatus for controlling the elevator will now be explained.
First, the writing operation of the floor numbers of respective floors in the RAM 8c will be described with reference to the flow chart of FIG. 5.
(a) The microcomputer 8 is first initialized, and the cage 1 is stopped at the lowermost floor. The level corresponding to the lowermost floor is, for example, determined to have a reference value L, and this is written in the address "0" of the RAM 8c as FLH(0). At this time, the present position FSY of the cage has a value L.sub.0.
(b) Then, the cage 1 is run upward, and the pulse generated from the pulse generator 6 is counter by the counters CT1, CT2 to measure the running distance of the cage. As shown in FIG. 5, upon the start of the writing and calculating program of the microcomputer 8, the counted values DP1 and DP2 of the counters CT1 and CT2 are input to the microcomputer 8 in step 100, and the reset signal RESET is delivered from the microcomputer 8 in the next step 101 to reset the counters CT1 and CT2 and the flip-flops FF1 and FF2. When the resetting operation is finished, the next step 102 determines whether the cage 1 is running upward, and, upon a "NO", the writing and calculating program is terminated. The next step 103 determines whether the output signal 11a of the position detector 11 increases, and, upon a "NO", the program advances directly to step 106 wherein the counted value DP1 of the counter CT1 is accumulated by the microcomputer 8 according to process FSY-FSY+DP1. The FSY is the present position of the cage 1, and the processes in the steps 100 to 103 and 106 are continuously executed during the running of the cage at every calculating period of the microcomputer 8.
(c) When the cage 1 goes up and arrives at the level of the next floor, the output signal 11a of the position detector 11 is detected by the microcomputer 8. This, in turn, provides a "YES" result in step 103. Then, the program advances to step 104, and the process of I+1 is executed so that a new floor number is written in the RAM 8c. The program proceeds to step 105, and the counted value DP2 of the counter CT2 is added to the present position FSY to provide the floor number calculated value FLH(I) to be written in the corresponding address I of the RAM 8c.
Similarly, the writing and calculations from step 100 to step 106 are repeated for subsequent floors up to the uppermost floor, and, in this particularr case, floor numbers FLH(0) to FLH(N-1) corresponding to the levels of N respective floors are written in the RAM 8c, as shown in FIG. 4.
The floor numbers obtained in this manner are utilized for the ordinary operation of the elevator. In other words, the floor numbers stored in the RAM 8c are used for the correction of the present position of the cage, the running distance of the cage from the departing floor to the destination floor, the remaining distance to the destination floor, and the reference speed command corresponding to the remaining distance.
However, the conventional writing and calculation program for the floor numbers as described above produces the following disadvantages.
(a) When a cage is displaced from a level at a floor, the present position of the cage at other floors cannot be corrected.
(b) Even if a certain door zone (the zone for opening or closing the door) is provided to accommodate the displacement of the cage when the elevator is first started, the level of the respective floors cannot be accurately corrected due to the wear of the sheave resulting from its extensive use in a prolonged period of time. In other words, even when a length LDZ of the door zone (stored in advance as a fixed value in the ROM) is taken into account in the determination of the present position of the cage, that is, the present position FSY satisfies the equation EQU FSY-FLH(I)+LDZ/2,
where I denotes the starting floor, accurate correction cannot be performed since this length is a fixed value and not related to or affected by wear of the sheave.
(c) The level of the floor of the building is not accurately stored in memory. In other words, the position detector does not accurately detect the position of 10 mm above the floor. Thus, there is a difference of 10 mm in the value of floor number FLH(I). Therefore, even if the calculation of FLH(I)-FSY (present position) is, for example, executed so as to obtain the remaining distance, a displacement of 10 mm occurs, thereby lowering the stopping accuracy of the cage.